#ifndef LOGICWORKER_INC
#define LOGICWORKER_INC

#include "Server/WorkerRunner.h"
#include "LogicMsgHandler.h"

class PlayerManager;
class ServerClientManager;
class LogicWorker
	: public WorkerRunner<LogicMsgHandler>
{
public:
	LogicWorker(UInt8);
	~LogicWorker();


public:
	inline UInt8 tid() const { return _tid; }

protected:
	bool init();
	bool postInit();
	void unInit();
	std::string getLogName();

	static void Game_Update(LogicWorker *);
	static void Server_Update(LogicWorker *);
	static void Game_Statistics(LogicWorker *);

public:
	inline PlayerManager * getPlayerManager() { return _pm; }
	inline ServerClientManager * getServerClientManager()	{ return _scm; }
	
protected:
	UInt8 _tid;
	PlayerManager * _pm;
	ServerClientManager * _scm;
};

#endif